IF OBJECT_ID('ssf.ptx_get_task') IS NOT NULL
	DROP FUNCTION ssf.ptx_get_task
GO

CREATE FUNCTION ssf.ptx_get_task (
	@task_group_id INT
)
RETURNS TABLE
AS
/*
<object_header>

<object_summary>
	<purpose><![CDATA[

	]]></purpose>
</object_summary>

</object_header>
*/

	RETURN (
		SELECT task_id
			, task_group_id
			, task_database_name
			, task_procedure_name
			, task_parameter_list
			, priority
			, semaphore_name
			, active_fl
			, insert_date
		FROM ssf.ptx_task WITH (NOLOCK)
		WHERE task_group_id = @task_group_id
	)
GO
